//
//  BaseSynchronousData.h
//  synchronous_data
//
//  Created by huimac on 2021/10/27.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


@protocol ArchiveAbleObject <NSObject>
@required
-(NSDictionary <NSString *, id>*)toJson;
-(id)toObject:(NSDictionary <NSString *, id>*)json;
@property (nonatomic, copy) NSString *uuid;
@end

@protocol ListenAbleObject <NSObject>
@required
-(NSString *)addListener:(void(^)(void))listner;
-(BOOL)removeListener:(NSString *)listnerId;
-(void)notifyListeners:(void(^)(void))complete;
@end


@interface BaseSynchronousData : NSObject <ArchiveAbleObject, ListenAbleObject>

@end

NS_ASSUME_NONNULL_END
